<template>
  <div class="seting">
    <!-- 导航 -->
    <HeaderTitle :title="WebName"></HeaderTitle>
    <!-- 列表box -->
    <div class="setingBox">
      <van-cell title="修改资料" is-link to="/modifyuser" />
      <van-cell title="意见反馈" is-link to="/" />
      <van-cell title="修改密码" is-link to="/changepassword" />
    </div>

      <van-button type="default" size="large" @click="Logout">退出登录</van-button>

  </div>
</template>
<script>
/* ... */
import HeaderTitle from '@/components/HeaderTitle.vue'
export default {
  name: 'seting',

  mixins: [],

  components: {
    HeaderTitle
  },

  props: {},

  data () {
    return {
      WebName: '设置'
    }
  },

  computed: {},

  watch: {},

  created () {
    if (localStorage.getItem('X-Auth-Token')) {
    } else {
      this.$toast.fail('您未曾登陆')
      this.$router.push('./login?tabs=0')
    }
  },

  mounted () {},

  destroyed () {},

  methods: {
    Logout () {
      localStorage.removeItem('X-Auth-Token')
      this.$toast('您已退出登录')
      this.$router.push('./login?tabs=0')
    }
  }
}
</script>

<style lang="less" >
/* ... */

.container {
   margin: 0 15px;
}
.seting {
  background-color: #f6f6f6;
  height: 100%;
  .setingBox{
    margin-bottom: 30px;
    padding-bottom: 10px
  }
  .van-button{
        color:#F52410;
  }
}
</style>
